-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add UNIX epoch <-> TIMESTAMP conversion functions #330
Conversation
lang/src/org/partiql/lang/eval/builtins/UnixTimestampFunction.kt
Outdated
Show resolved
Hide resolved
0725816
to
550121f
Compare
New commit removes the negative unix epoch / timestamp before the last epoch restriction and updates tests + docs accordingly. Also adds |
lang/src/org/partiql/lang/eval/builtins/FromUnixTimeFunction.kt
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #330 +/- ##
============================================
+ Coverage 79.58% 79.61% +0.03%
- Complexity 1190 1197 +7
============================================
Files 157 159 +2
Lines 9371 9391 +20
Branches 1526 1527 +1
============================================
+ Hits 7458 7477 +19
- Misses 1472 1473 +1
Partials 441 441
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Adds functions to convert from UNIX epoch to TIMESTAMP and TIMESTAMP to UNIX epoch. Largely follows MySQL's variants: FROM_UNIXTIME and UNIX_TIMESTAMP.
Still might need discussion on:
UNIX_TO_TIMESTAMP
andTIMSTAMP_TO_UNIX
would be better?from_unixtime("1234567890")
)?0
)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.